<?php
// +---------------------------------------------------------------------------+
// | This file is part of the KnowledgebasePublisher package                   |
// | KnowledgebasePublisher - web based knowledgebase publisher tool           |
// |                                                                           |
// | Author:  Evgeny Leontev <eleontev@gmail.com>                              |
// | Copyright (c) 2005 Evgeny Leontev                                         |
// |                                                                           |
// | For the full copyright and license information, please view the LICENSE   |
// | file that was distributed with this source code.                          |
// +---------------------------------------------------------------------------+

require_once 'config.inc.php';

require_once APP_MSG_LANG_DIR . 'config_lang.php';
require_once 'eleontev/HTML/BoxMsg.php';
require_once 'eleontev/Assorted.inc.php';


foreach($_GET as $k => $v) {
	$k = str_replace('amp;', '', $k);
	$_GET[$k] = $v;
}



$delay_time = $_GET['delay_time'];
$msg = $_GET['msg'];
$url = WebUtil::unserialize_url($_GET['page_to_return']);

//echo "<pre>"; print_r($_GET); echo "</pre>";
//echo "<pre>"; print_r($url); echo "</pre>";
//exit;

$file = APP_MSG_LANG_DIR . 'after_action_msg.ini';
$data = parse_ini_file($file, 1);


$hint = new SuccessMsg();
$hint->assignVars('url', $url);
$hint->setMsg('title', $data[$msg]['title']);
$hint->setMsg('body',  @$data[$msg]['body'] . 
                       '<br>Redirecting ... <br> 
                       Click the link <a href="{url}">go back</a> if nothing happened');
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title></title>
	<meta http-equiv="content-type" content="text/html; charset=<?php echo $conf['lang']['meta_charset']; ?>">
	<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
    <!--
    function redirect() {
		document.location.replace('<?php echo $url; ?>');
	}
    //-->
    </SCRIPT>
	<link rel="STYLESHEET" type="text/css" href="css/style.css">
</head>

<!-- setTimeout( function() { redirect(counter); }, 1000 ); -->
<body onLoad="setTimeout(redirect, <?php echo $delay_time; ?>)">

<table width="70%" height="100%" align="center">
	<tr><td height="50%" valign="middle">
	
	<?php echo $hint->get(); ?>
	
	</td></tr>
	<tr><td></td></tr>
</table>


</body>
</html>
